home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
os20
/
util
/
multiuser12a.lha
/
MultiUser
/
Auto
/
multiuser.doc
Wrap
Text File
|
1993-03-30
|
11KB
|
358 lines
TABLE OF CONTENTS
multiuser.library/muAllocUserInfo
multiuser.library/muFreeUserInfo
multiuser.library/muGetDefProtection
multiuser.library/muGetTaskOwner
multiuser.library/muGetUserInfo
multiuser.library/muLoginA
multiuser.library/muLogoutA
multiuser.library/muPasswd
multiuser.library/muSetDefProtection
multiuser.library/muSetLibFlush
multiuser.library/muAllocUserInfo multiuser.library/muAllocUserInfo
NAME muAllocUserInfo() (V39)
info = struct muUserInfo *muAllocUserInfo();
struct muUserInfo *muAllocUserInfo(void);
D0
DESCRIPTION
Allocates a muUserInfo structure for you in a future compatible manner.
This is the only valid way to allocate a muUserInfo structure. The
structure will be made empty for you.
INPUTS
none
RESULT
info - pointer to the allocated muUserInfo structure or NULL for no
memory.
BUGS
none known
SEE ALSO
muFreeUserInfo(), muGetUserInfo()
multiuser.library/muFreeUserInfo multiuser.library/muFreeUserInfo
NAME muFreeUserInfo() (V39)
muFreeUserInfo(info);
void muFreeUserInfo(struct muUserInfo *);
A0
DESCRIPTION
Frees a muUserInfo structure allocated with muAllocUserInfo.
INPUTS
info - a pointer to the muUserInfo structure you want to free. May be
NULL.
RESULT
none
BUGS
none known
SEE ALSO
muAllocUserInfo(), muGetUserInfo()
multiuser.library/muGetDefProtection multiuser.library/muGetDefProtection
NAME muGetDefProtection() (V39)
mask = muGetDefProtection(task);
ULONG muGetDefProtection(struct Task *);
D0 D0
DESCRIPTION
Get the default protection bits related to a task.
INPUTS
task - a pointer to the task for which you want to know the default
protection bits, or NULL for the current task.
RESULT
mask - the default protection bits. They are in the format like defined
in <dos/dos.h>.
BUGS
none known
SEE ALSO
muSetDefProtection()
multiuser.library/muGetTaskOwner multiuser.library/muGetTaskOwner
NAME muGetTaskOwner() (V39)
user = muGetTaskOwner(task);
ULONG muGetTaskOwner(struct Task *);
D0 D0
DESCRIPTION
Get the owner of a task.
INPUTS
task - a pointer to the task of which you want to know the owner, or NULL
for the current task.
RESULT
user - the owner of the specified task. The bits 31-16 specify the owner
user id (uid), the bits 15-0 specify the owner group id (gid).
NULL for nobody.
BUGS
none known
SEE ALSO
muGetUserInfo()
multiuser.library/muGetUserInfo multiuser.library/muGetUserInfo
NAME muGetUserInfo() (V39)
info = muGetUserInfo(info, keytype);
struct muUserInfo *muGetUserInfo(struct muUserInfo *, ULONG);
D0 A0 D0
DESCRIPTION
Get information about a user. You must pass in a muUserInfo structure
and a keytype, which defines the type of information you have filled in
in the muUserInfo structure about the wanted user. Valid keytypes are:
muKeyType_First - find the first user. You don't have to fill in
any fields in the muUserInfo structure.
muKeyType_Next - find the next user. Use this only after you've
made a call with muKeyType_First as keytype.
muKeyType_UserID - find a user with a specific UserID. Fill in the
field UserID before calling muGetUserInfo(). The
search will be case sensitive.
muKeyType_uid - find a user with a specific uid. Fill in the
field uid before calling muGetUserInfo().
muKeyType_gid - find a user with a specific gid. Fill in the
field uid before calling muGetUserInfo().
muKeyType_gidNext - find the next user with a specific gid. Use this
only after you've made a call with muKeyType_gid
as keytype.
muKeyType_UserName - find a user with a specific UserName. Fill in the
field UserName before calling muGetUserInfo().
The search will be case insensitive.
INPUTS
info - an muUserInfo structure, allocated with muAllocUserInfo.
keytype - the magic keytype.
RESULT
info - a pointer to the supplied muUserInfo structure, or NULL for a
failure.
NOTE
Do not change the contents of a muUserInfo structure between calls to
muGetUserInfo() with muKeyType_First/muKeyType_Next or
muKeyType_gid/muKeyType_gidNext.
BUGS
none known
SEE ALSO
muAllocUserInfo(), muGetUserInfo(), <libraries/multiuser.h>,
dos.library/SetOwner()
multiuser.library/muLoginA multiuser.library/muLoginA
NAME muLoginA() (V39)
user = muLoginA(taglist);
ULONG muLoginA(struct TagItem *);
D0 A0
DESCRIPTION
Login to the system and remember the last user. Use the taglist to
specify options.
TAGS
muT_Graphical - (BOOL)
use a graphical login instead of a console alike one.
Default is FALSE.
muT_Input - (BPTR)
specify the filehandle to read from. Not used for a
graphical login. Default is Input().
muT_Output - (BPTR)
specify the filehandle to write to. Not used for a
graphical login. Default is Output().
muT_PubScrName - (char *)
specify the public screen to open the login requester
on. Only used for a graphical login. Default is the
default public screen (mostly the Workbench screen).
muT_Task - (struct Task *)
specify the task you want to login. Of course this
works only for your own tasks (or for tasks owned by
nobody), unless you are the super user (root). Default
is the current task.
muT_Own - (BOOL)
change the owner of the specified task to the owner of
the task this call is made from. Of course this works
only for tasks owned by nobody, unless you are the super
user (root). Default is FALSE.
muT_Global - (BOOL)
login for all tasks on the same level as this one.
Default is FALSE.
INPUTS
taglist - a pointer to a taglist (may be NULL).
RESULT
user - the user that logged in, or NULL for a failure. The bits 31-16
specify the owner user id (uid), the bits 15-0 specify the owner
group id (gid).
BUGS
none known
SEE ALSO
muLogoutA()
multiuser.library/muLogoutA multiuser.library/muLogoutA
NAME muLogoutA() (V39)
user = muLogoutA(taglist);
ULONG muLogoutA(struct TagItem *);
D0 A0
DESCRIPTION
Logout and restore the previous user. If there was no previous user or
the previous user was nobody, a login request will appear. However, the
behavior of this login request will be slightly different from that of
muLoginA(), more specifically the following actions will be taken:
- the local variable 'Home' will be set to your home directory.
- the current directory will be set to your home directory.
- If there exists a script file called '.profile' in your home
directory, it will be executed.
TAGS
muT_Input - see muLoginA()
muT_Output - see muLoginA()
muT_Graphical - see muLoginA()
muT_PubScrName - see muLoginA()
muT_Task - see muLoginA()
muT_Own - see muLoginA()
muT_Global - see muLoginA()
muT_Quiet - (BOOL)
Never request for a login, simply logout. Default FALSE.
INPUTS
taglist - a pointer to a taglist (may be NULL).
RESULT
user - the user you're now, NULL for nobody. The bits 31-16 specify the
owner user id (uid), the bits 15-0 specify the owner group id
(gid).
NOTE
If there was no previous user, this routine will not return until you
enter a valid UserID/password pair (unless you used the tag muT_Quiet)!
However, this tag may be removed in future releases for enhanced
security.
BUGS
none known
SEE ALSO
muLoginA()
multiuser.library/muPasswd multiuser.library/muPasswd
NAME muPasswd() (V39)
succes = muPasswd(oldpwd, newpwd);
BOOL muPasswd(char *, char *);
D0 A0 A1
DESCRIPTION
Change the password for the owner of the task this routine is called
from.
INPUTS
oldpwd - your old password.
newpwd - your new password.
RESULT
succes - indicates a succesfull password change.
NOTE
For the format of the passwd-file, see <libraries/multiuser.h>. This
format should be compatible with the Commodore AS255 passwd file.
BUGS
none known
SEE ALSO
multiuser.library/muSetDefProtection multiuser.library/muSetDefProtection
NAME muSetDefProtection() (V39)
succes = muSetDefProtection(task, mask);
BOOL muSetDefProtection(struct Task *, ULONG);
D0 D0 D1
DESCRIPTION
Set the default protection bits related to a task.
INPUTS
task - a pointer to the task for which you want to set the default
protection bits, or NULL for the current task.
mask - the default protection bits. They must be in the format like
defined in <dos/dos.h>.
RESULT
succes - succes indicator.
BUGS
none known
SEE ALSO
muGetDefProtection()
multiuser.library/muSetLibFlush multiuser.library/muSetLibFlush
NAME muSetLibFlush() (V39)
succes = muSetLibFlush(allowed);
BOOL muSetLibFlush(BOOL);
D0 D0
DESCRIPTION
Specify whether the multiuser.library may be flushed or not. This
behavior can be changed only by the super user (root), because all
task-owner relationships will be lost after a library flush. Default the
library may not be flushed.
INPUTS
allowed - TRUE if the library may be flushed.
RESULT
succes - succes indicator.
BUGS
none known
SEE ALSO